package com.java46.struts2.base.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * @ClassName TDishesEntity
 * @Description 菜品信息
 * @Author zuxia
 * @Date 2018/7/17 14:38
 * @Vcrsion 1.0
 **/
@Entity
@Table(name = "t_dishes", schema = "fullboydb")
public class TDishesEntity {
    private int dId;
    private String dName;
    private BigDecimal dPrice;
    private String dRemark;
    private String dImg;
    private int dTypeId;



    @Id
    @Column(name = "dId")
    
    public int getdId() {
        return dId;
    }

    public void setdId(int dId) {
        this.dId = dId;
    }

    @Basic
    @Column(name = "dName")
    public String getdName() {
        return dName;
    }

    public void setdName(String dName) {
        this.dName = dName;
    }

    @Basic
    @Column(name = "dPrice")
    public BigDecimal getdPrice() {
        return dPrice;
    }

    public void setdPrice(BigDecimal dPrice) {
        this.dPrice = dPrice;
    }

    @Basic
    @Column(name = "dRemark")
    public String getdRemark() {
        return dRemark;
    }

    public void setdRemark(String dRemark) {
        this.dRemark = dRemark;
    }

    @Basic
    @Column(name = "dImg")
    public String getdImg() {
        return dImg;
    }

    public void setdImg(String dImg) {
        this.dImg = dImg;
    }

    @Basic
    @Column(name = "dTypeId")
    public int getdTypeId() {
        return dTypeId;
    }

    public void setdTypeId(int dTypeId) {
        this.dTypeId = dTypeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TDishesEntity that = (TDishesEntity) o;
        return dId == that.dId &&
                dTypeId == that.dTypeId &&
                Objects.equals(dName, that.dName) &&
                Objects.equals(dPrice, that.dPrice) &&
                Objects.equals(dRemark, that.dRemark) &&
                Objects.equals(dImg, that.dImg);
    }

    @Override
    public int hashCode() {

        return Objects.hash(dId, dName, dPrice, dRemark, dImg, dTypeId);
    }
}
